﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLBH.Model.Controller;
using QLBH.DataModel;
using QLBH.ModelInterface;

namespace QLBH.Category.Presenter
{
    public class QLNganhHangPresenter
    {
        public QLNganhHangPresenter()
        {

        }
        public List<IQLNganhHangModel> GetDSNganhHang()
        {
            List<IQLNganhHangModel> results = new List<IQLNganhHangModel>();
            var items = NganhHangController.GetInstance().GetAll();
            foreach (NGANHHANG enity in items)
            {
                var model = ModelFactory.ModelFactory.GetQLNganhHangModelInstance();
                model.InitFromEntity(enity);
                results.Add(model);
            }
            return results;
        }
    }
}
